# -*-coding=utf-8 -*-
char_list = ['a', 'b', 'c', 'd', 'f', 'j', 'a', 'd', 'c']
sentence = 'Welcome Back to this Tutorial'
print type(set(char_list))
print set(sentence)

unique_char = set(char_list)
unique_char.add('x')
print unique_char
unique_char.remove('x') # 无该元素，会报错
print unique_char
unique_char.discard('y') # 无该元素，不会报错
print unique_char
unique_char.clear()
print unique_char

set1 = {'a', 'b', 'x', 'v'}
set2 = {'a', 'b', 'n', 'z'}
print set1.difference(set2)
print set1.intersection(set2)